#!/usr/bin/php
<?php

include ("ConnectionIntra.class.php");

function main($argc, $argv)
{
  $connect = new ConnectionIntra('demouc_m', 's5]mxiIt');
  
  if ($connect->checkIsConnected())
    {
      echo "CONNECTED\n";
      if ($connect->parseRapportStudent() == true)
	{
	  echo "Full Name : " . $connect->getFullName() . "\n";
	  echo "Promo : " . $connect->getPromo() . "\n";
	  echo "City : " . $connect->getCity() . "\n";
	}
    }
  else
    {
      echo "NOT CONNECTED :: ";
      if ($connect->checkProblemForConnection() == 0)
	echo "MAUVAIS LOGIN\n";
      if ($connect->checkProblemForConnection() == 1)
	echo "MAUVAIS PASSWORD\n";
    }
}

main($argc, $argv);

?>